-
Notifications
You must be signed in to change notification settings - Fork 710
circular resume touch fixes #2022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
circular resume touch fixes #2022
Conversation
| android:layout_gravity="center" | ||
| android:layout_marginStart="10dp" | ||
| android:gravity="center" | ||
| android:letterSpacing="0.09" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
| android:layout_marginStart="10dp" | ||
| android:gravity="center" | ||
| android:letterSpacing="0.09" | ||
| android:textColor="?attr/black" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? This does not match the other buttons color at all.
| tools:ignore="RtlSymmetry" | ||
| android:letterSpacing="0.09" | ||
| android:textAllCaps="false" | ||
| android:textColor="?attr/black" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue.
| tools:text="69m remaining" | ||
| android:textStyle="bold" | ||
| tools:ignore="RtlSymmetry" | ||
| android:letterSpacing="0.09" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue.
| observeNullable(viewModel.movie) { data -> | ||
| resultBinding?.apply { | ||
| resultPlayMovie.isVisible = data is Resource.Success | ||
| resultPlayMovie.isVisible = data is Resource.Success && (viewModel.resumeWatching.value == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it could be a race condition. Please do not do logic that depends on two different values.
|
@fire-light42 I think previously fixes are not that good. Making clickable and focusable to false solved click issue i didn't noticed that before, and moving watching observable below movie solved play movie visibility issue. |
|
|
||
| (data as? Resource.Success)?.value?.let { (text, ep) -> | ||
| resultPlayMovie.setText(text) | ||
| // resultPlayMovie.setText(text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that setText may change visibility here, but it is required that the text of resultPlayMovie is set as otherwise it will say "Play Movie" on both torrents and livestreams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could manually do the .toStringNull here if visibility is not what you want.
| ) | ||
| return@setOnLongClickListener true | ||
| } | ||
| resultResumeSeriesButton.setOnLongClickListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unable to trigger this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to place this somewhere else given that no series will be a valid movie?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's only for movie
That screams race condition to me, do not rely upon the execution order of observe. Observe may trigger in any order, so place |
da98f6f to
4ee75ec
Compare
|
@fire-light42 did changes |
No description provided.